<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>提示弹窗</title>
</head>

<body>


    https://segmentfault.com/

    <div class="modal-backdrop"></div>
    <div class="n-box">
        <div class="n-content">
            <div class="modal-content">
                <!--顶部-->
                <div class="modal-header">
                    <div class="modal-title">小提示</div>
                    <button type="button" class="btn-close"></button>
                </div>
                <!--内容区-->
                <div class="modal-body">
                    <div class="text-center">
                        <h1>你知道吗？</h1>
                        <p class="my-3">我没有写过诗，但有人说我写过的代码，像诗一样优雅。</p>
                        <p class="mb-3">_(:з」∠)_</p>
                        <button type="button" class="btn-primary">注册登录</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <style>
        .modal-backdrop {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1050;
            width: 100vw;
            height: 100vh;
            background-color: #000;
            opacity: .5;
        }

        .n-box {
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1055;
            display: block;
            width: 100%;
            height: 100%;
            overflow-x: hidden;
            overflow-y: auto;
            outline: 0;
            transition: opacity .15s linear;
        }

        .n-box .n-content {
            transform: none;
            transition: transform .3s ease-out;

            display: flex;
            align-items: center;
            min-height: calc(100% - 1rem);

            position: relative;
            width: auto;
            margin: 0.5rem;
            pointer-events: none;
        }

        .modal-content {
            position: relative;
            display: flex;
            flex-direction: column;
            width: 100%;
            pointer-events: auto;
            background-color: #fff;
            background-clip: padding-box;
            border: 1px solid rgba(0, 0, 0, .2);
            border-radius: 0.3rem;
            outline: 0;
        }

        /*顶部*/
        .modal-header {
            display: flex;
            flex-shrink: 0;
            align-items: center;
            justify-content: space-between;
            padding: 1rem;
            border-bottom: 1px solid #dee2e6;
            border-top-left-radius: calc(0.3rem - 1px);
            border-top-right-radius: calc(0.3rem - 1px);
        }

        .modal-title {
            margin-bottom: 0;
            line-height: 1.5;
            font-size: calc(1.275rem + .3vw);
        }

        .modal-header .btn-close {
            padding: 0.5rem;
            margin: -0.5rem -0.5rem -0.5rem auto;
        }

        .btn-close {
            box-sizing: content-box;
            width: 1em;
            height: 1em;
            padding: 0.25em;
            color: #000;
            background: transparent url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") 50%/1em auto no-repeat;
            border: 0;
            border-radius: 0.25rem;
            opacity: .5;
        }

        /*内容区*/
        .modal-body {
            padding-top: 0 !important;
            padding-bottom: 0 !important;

            position: relative;
            flex: 1 1 auto;
            padding: 1rem;
        }

        .text-center {
            text-align: center !important;
            padding-top: 3rem !important;
            padding-bottom: 3rem !important;
        }

        .my-3 {
            margin-top: 1rem !important;
            margin-bottom: 1rem !important;
        }

        .mb-3 {
            margin-bottom: 1rem !important;
        }

        .btn-primary {
            width: 178px;

            padding: 0.5rem 1rem;
            font-size: 1.25rem;
            border-radius: 0.3rem;
            color: #fff;
            background-color: #00965e;
            border-color: #00965e;

            display: inline-block;
            font-weight: 400;
            line-height: 1.5;

            text-align: center;
            text-decoration: none;
            vertical-align: middle;
            cursor: pointer;
            user-select: none;

            border: 1px solid transparent;

            transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;

        }

        @media (min-width: 576px) {
            .n-box .n-content {
                min-height: calc(100% - 3.5rem);
                max-width: 500px;
                margin: 1.75rem auto;
            }


        }
    </style>
</body>

</html>